<template>
  <div id="#deviceCascader">
    <el-cascader v-model="selectedDevice" :options="dataProvider.devices" :show-all-levels="true"
      :props="props.deviceProps"></el-cascader>
  </div>
</template>

<script>
  import r from '../../utils/RequestUtil'
  export default {
    name: "deviceCascader",
    data: function () {
      return {
        dataProvider: {
          devices: []
        },
        props: {
          deviceProps: {
            value: "name",
            label: "name",
            children: "children"
          }
        }
      }
    },
    computed: {
      selectedDevice: function () {
        let arr = [];
        arr.push("手机");
        arr.push(this.brand);
        arr.push(this.model);
        arr.push(this.color);
        return arr;
      }
    },
    props: {
      brand: {
        type: String,
      },
      model: {
        type: String,
      },
      color: {
        type: String
      }
    },
    created: function () {}
  }

</script>

<style scoped="scoped">
  .el-cascader {
    width: 100%;
  }

</style>
